package com.dreem.adapter.objectadapter;

/**
 * @program: DesignParrtern
 * @description: 电压适配
 * @author: Peng
 * @create: 2021-01-30  11:36
 **/
public class VoltageAdapter implements IVoltage5V {
    private Voltage220V voltage220V = null;

    public VoltageAdapter(Voltage220V voltage220V){
        this.voltage220V = voltage220V;
    }

    public int voltageAdapt(){
        int dst = 0;
        int src = voltage220V.outPut220V();
        if(src != 0){
            dst = src / 44;
        }
        return dst;
    }
}
